<!DOCTYPE html>
<!-- saved from url=(0045)http://c.tsz90.com/home/task/edit/id/612.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>投票浏览</title>
<link rel="stylesheet" href="__PUBLIC__/static/css/renwu/taskdatail.css">
<!-- 弹出层 -->
<script src="__PUBLIC__/static/js/renwu/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/js/renwu/public.js"></script>
</head>
<body style="background: rgb(255, 255, 255);">
<header class="bg_header">
	<a onclick="history.back()" class="left"><img src="__PUBLIC__/static/upload/renwu/icon_back.png" alt=""></a>
	投票浏览	<!-- <a href="#" class="right"><img src="/static/home/mobile/images/icon_add.png" alt=""></a> -->
</header>

<div class="basic_infor">
	<div class="container">
		<h3 class="release_title">填写基本信息</h3>
		<div class="infor_card ">
			<div class="inline_form2">
				<label for="">项目名称</label>
				<div class="right">
					<input type="text" name="pro_name" id="pro_name" class="task-txt new-add-task-content" placeholder="一般为APP或网站名字" value="<?php echo $res['pro_name'] ?>">
				</div>
			</div>
			<div class="inline_form2">
				<label for="">悬赏标题</label>
				<div class="right">
					<input type="text" name="title" id="title" class="task-txt new-add-task-content" placeholder="请输入任务标题" value="<?php echo $res['title'] ?>">
				</div>
			</div>
			<div class="inline_form">
				<label for="">提交限时</label>
				<div class="right">
					<!-- 美化 -->
					<!-- <a href="javascript:void(0)"  class="sel_mask"><span id="sel01_span">限制<font>24</font>小时内提交</span> -->
					    
						<select style="display:inline;" class="sel" id="sel01" name="submittime">
                                                                <option value="1" selected="selected">
                                        限制1小时内提交
                                    </option>
                                                                    <option value="6">
                                        限制6小时内提交
                                    </option>
                                                                    <option value="12">
                                        限制12小时内提交
                                    </option>
                                                                    <option value="24">
                                        限制24小时内提交
                                    </option>
                                                                    <option value="48">
                                        限制48小时内提交
                                    </option>
                                                                    <option value="72">
                                        限制72小时内提交
                                    </option>
                                                        </select>
					
				</div>
			</div>
			<div class="inline_form">
				<label for="">审核周期</label>
				<div class="right">
					<!-- 美化 -->
					<!-- <a href="javascript:void(0)"  class="sel_mask"><span id="sel02_span">将在<font>24</font>小时内审核</span> -->
						<select style="display:inline;" class="sel" id="sel02" name="periodtime">
                                                                <option value="1">
                                    将在1小时内审核
                                    </option>
                                                                    <option value="6">
                                    将在6小时内审核
                                    </option>
                                                                    <option value="12">
                                    将在12小时内审核
                                    </option>
                                                                    <option value="24" selected="selected">
                                    将在24小时内审核
                                    </option>
                                                                    <option value="48">
                                    将在48小时内审核
                                    </option>
                                                                    <option value="72">
                                    将在72小时内审核
                                    </option>
                                                                    <option value="120">
                                    将在120小时内审核
                                    </option>
                                                        </select>
					
				</div>
			</div>
			<div class="inline_form2">
				<label for="">可以重做</label>
				<div class="right btns">
					<a href="javascript:;" data-chongzuo="2">否</a>
					<a href="javascript:;" class="active" data-chongzuo="1">是</a>
				</div>
			</div>
		</div>
		<div class="infor_card infor_card02">
			<div class="inline_form">
				<label for="">悬赏单价</label>
				<div class="right">
					<input type="text" disabled="" class="task-txt" value="<?php echo $res['unit_price'] ?>元/人(管理中心可增加赏金)">
				</div>
			</div>
			<div class="inline_form">
				<label for="">悬赏名额</label>
				<div class="right">
					<input type="text" disabled="" class="task-txt" value="<?php echo $res['ticket_num'] ?>人(管理中心可增加赏金)">
				</div>
			</div>
			
		</div>
		<div class="next_step">
			<a id="btn_ds" data-id="<?php echo $res['id'] ?>">下一步(设置步骤)</a>
		</div>
		<input type="hidden" name="category_id" id="category_id" value="7">
		<input type="hidden" name="service_charge" id="service_charge" value="0">
         
	</div>
</div>


<script>
	$(function(){
		 $('#sel01').change(function () {    // 选择后替换内容
	        $('#sel01_span').addClass("on").html($('#sel01').find('option:selected').html());
	    })
		  $('#sel02').change(function () {    // 选择后替换内容
	        $('#sel02_span').addClass("on").html($('#sel02').find('option:selected').html());
	    })
	  //是否切换切换
		$('.infor_card .btns a').click(function(){
				$(this).addClass('active').siblings().removeClass('active');
		});

		$("#btn_ds").bind("click", function () {

			var pro_name=$("#pro_name").val();
			var title=$("#title").val();
			
			var submittime=$("#sel01").val();
			var periodtime=$("#sel02").val();
			var chongzuo = $(".active").data("chongzuo");

			
			if(pro_name.trim()==""){
            myalert('请填写项目名称！','','error');
            return false;
			}
			
			if(title.trim()==""){
				myalert('请填写任务标题！','','error');
				return false;
			}
			var id=$(this).attr('data-id');


			$.ajax({
                type:"post",
                 url:"update1?id="+id,
                data:{pro_name:pro_name,title:title,submittime:submittime,periodtime:periodtime,chongzuo:chongzuo},
                success:function(ret){
					var json=JSON.parse(ret);
	            	if(json.code==0){
						myalert(json.msg);
						var biaoti=json.str;
						location.href="http://www.tp.com/thinkphp5/public/index.php/index/renwu/release?pro_name="+pro_name;
	            	}else{
	            		myalert(json.msg);
	            	}
                }
            })
        });
		
	})


	
</script>




		
 </body></html>